<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<title>会员个人信息</title>
<link rel="stylesheet" type="text/css" href="../../css/aui-win.css" />
<style type="text/css">
	.hr01, .hr02 {
				height: 28px;
			}
			.headerico {
				padding: 0px 15px 5px 15px;
				color: #fff;
				font-size: 20px;
			}
			.collect {
				margin-left: 20%;
				color: white;
				font-size: 16px;
			}
			body {
				font-size: 16px;
			}
			.content {
				margin-top: 10px;
			}
			input[type="text"] {
				width: 65%;
				border: none;
				border-bottom: 1px solid #808080;
				padding-left: 5%;
			}
			.telnum {
				width: 65%;
				border: none;
				border-bottom: 1px solid #808080;
				padding-left: 5%;
				height: 35px;
			}
			.telnum a {
				color: #00ABFD;
			}
			.next {
				margin-left: 8%;
			}
			html, body {
				width: 100%;
				min-height: 100%;
				background: #f0f0f0;
			}
			.h10 {
				height: 10px;
				background: #f0f0f0;
			}
			.h1 {
				height: 1px;
				background: #f0f0f0;
			}
			.fr {
				float: right;
			}
			.hint {
				color: #666;
				font-size: 12px;
				margin-right: 5px;
			}
			.firstblock {
				height:100px;
			}
			.firstblock, .secondblock, .thirdblock {
				background-color: #fff;
			}
			.person_arrow {
				position: absolute;
				height: 20px;
				right: 10px;
				top: 50px;
			}
			#photo {
				float:left;
				width: 80px;
				height: 80px;
				padding: 10px 0px 0px 2.5%;
			}
			.userinfo {
				margin-left: 100px;
				position:relative;
				top:8px;
				width: 60%;
			}
			#name {
				font-size: 20px;
			}
			#sexs {
				margin-top: 3px;
				float:left;
				height:18px;
			}
			.chatbut {
			margin-top: 3px;
			margin-left:10px;
			width:40px;
				height: 18px;
				line-height: 18px;
				position: relative;
				border-radius: 10px;
				background: #00ABFD;
				padding: 0px 5px;
				color: white;
				font-size: 12px;
				padding: 0px 5px;
				color: white;
				float:left;
				text-align:center;
			}
			#company {
				width: 100%;
				display: block;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
				line-height:2;
				color:#999;
			}
			/* 设置条目 */
			.item {
				height: 50px;
				line-height: 50px;
				background-color: #fff;
			}
			.item .data {
				margin-left: 15px;
			}
			.item_ico {
				float: left;
				width: 30px;
				padding: 10px 10px 10px 0;
				margin-left: 15px;
			}
			.itemheader {
				height: 100px;
				line-height: 100px;
				padding-left: 15px;
				background-color: #fff;
			}
			.item_phone {
				float: left;
				width: 80px;
				padding: 10px 10px 10px 0;
			}
			.item_arrow {
				float: right;
				width: 16px;
				padding: 17px 15px 15px 0;
			}
			.presshover {
				background-color: #FAFAFA;
			}
			.showDiv {
				display: none;
			}
			#itemm lable{
				width: 28%;
				height: 30px;
				float: left;
				display: block;
			}
			#itemm input{
				width: 60%;
				height: 33px;
				float: left;
				display: block;
				border-bottom: 1px solid #ccc;
				padding-left:5px;
			}
			#itemm lable span{
				color: white
			}
			.aui-pull-right{
			position:absolute;
			top:0;
			right:15px;
			}
			#tel{
				width: 60%;
				height: 33px;
				float: left;
				display: block;
				border-bottom: 1px solid #ccc;
				padding-left:5px;
			}
			.content{
				color:#333;
			}
			#collectImg{
				width:22px;
				height:22px;
				margin-top:10px;
			}
</style>
</head>
<body>
    <div class="div_loding_img">
		数据加载中
	</div>
		<header class="aui-bar aui-bar-nav aui-bar-yunzo" id="aui-header">
		<a class="aui-btn aui-bar-yunzo aui-pull-left" id="back" onclick="rec()"> <span class="aui-iconfont aui-icon-left"></span></a>
		<div class="aui-title" id="title">
			会员个人信息
		</div>
		<a class="aui-iconfont aui-icon-menu aui-pull-right" style="position:absolute;right:10px;"><span id="collect" onclick="collectInfo()"><img  src="../../image/home/busess/soucang2.png" id="collectImg"></span></a>
	</header>
	<div class="margin_div"></div>
		<div class="content">
			<div class="firstblock">
				<img id="photo"  src="" alt="">
				<div class="userinfo">
					<div class="title" id="name"></div>
					<img id="sexs" src="" alt="">
					<div id="chat" onclick="chatme()" class="chatbut"></div>
					<div id="company"></div>
				</div>
			</div>
			<div class="h10 "></div>
			<div class="secondblock">
				<div class="item" id="itemm">
					<lable class="data">
						联系电话:
					</lable>
					<a id="tel" ></a>
				</div>
				<div class="item" id="itemm">
					<lable class="data">
						籍<span>空空</span>贯:
					</lable>
					<input id="address" type="text" readonly>
				</div>
				<div class="item" id="itemm">
					<lable class="data">
						性<span>空空</span>别:
					</lable>
					<input id="sex" type="text" readonly>
				</div>
				<div class="item" id="itemm">
					<lable class="data">
						出生日期:
					</lable>
					<input type="text" id="birthday" readonly>
				</div>
			</div>
			<div class="h10 "></div>
			<div class="thirdblock">
				<div class="item" tapmode="presshover" tapmode="active" onclick="openComWin()">
					<img src="../../image/my/compang.png" alt="" class="item_ico">
					<a>公司信息</a>
					<img src="../../image/my/arrow.png" alt="" class="item_arrow">
				</div><div class="h1"></div>
				<div class="item" tapmode="presshover" tapmode="active" onclick="openGroupWin()">
					<img src="../../image/my/group.png" alt="" class="item_ico">
					<a>商会信息</a>
					<img src="../../image/my/arrow.png" alt="" class="item_arrow">
				</div><div class="h1"></div>
				<div class="item" tapmode="presshover"  tapmode="active" onclick="openBusessWin()">
					<img src="../../image/my/buss.png" alt="" class="item_ico">
					<a>发布的商机</a>
					<img src="../../image/my/arrow.png" alt="" class="item_arrow">
					<span class="fr hint">工、农、学、商</span>

				</div>
			</div>
		</div>
</body>
<script src="../../script/jquery-1.10.2.min.js"></script>
<script src="../../script/common.js"></script>
<script>
	var pagesize = 1000;
	//当前数量
	var curCount = 0;
	//显示内容
	var objcontent;
	var infoid;
	var flag;
	var myMid;
	var name;
	var tel;
	$(document).ready(function(){
		infoid=getUrlParam('infoid');
		flag=getUrlParam('flag');
    	var Post =basedata('gcotactsinfo')+'&tomid=' + infoid + '&togroupid=' + $groupid;
    	ajaxcocRequest('../../../api/account/getmemberinfobymid', 'post', Post, function(msg){
			if(msg.code ==100){
				if (msg.datum.length != 0) {
					pid = msg.datum.n0;
					myMid = msg.datum.n4;
					//banner = $api.byId('banner');
					if(msg.datum.n1=="null")
					{
						img="../../image/tongxunlu.png";
					}else{
						img=msg.datum.n1;
					};
					if($mtype=="guest"||flag==1)
					{
						name=msg.datum.n2.substring(1,0)+"**";
						tel=msg.datum.n4.substring(3,0)+"********";
					}else
					{
						name=msg.datum.n2;
						tel=msg.datum.n4;
					}
		
					sex = msg.datum.n6;
					birthday = msg.datum.n7;
					
					
					birthplace = msg.datum.n5;
					
					company = msg.datum.n3;
					if(birthday==null){
						$('#birthday').val("尚无信息！");
					}
					else{
						$('#birthday').val(birthday);
					}
					if(birthplace==null){
						$('#address').val("尚无信息！");
					}
					else{
						$('#address').val(birthplace);
					}
					$('#photo').attr("src",img);
					$('#name').html(name);
					$('#company').html(company);
					$('#tel').html(tel);
					$("#tel").attr("href","tel:"+tel)
					
					$('#sex').val(sex);
					
					if (msg.datum.n9 == 0) {
						$('#collectImg').attr("src","../../image/home/busess/soucang.png");
						type = 1;
						
					} else {
						$('#collectImg').attr("src","../../image/home/busess/soucang2.png");
						type = 0;
					
					}
					if (msg.datum.n6 == "男") {
						$('#chat').html("私聊他");
						$('#sexs').attr("src","../../image/my/manIcon.png");
					} else {
						$('#chat').html("私聊她");
						$('#sexs').attr("src","../../image/my/womenIcon.png");
					}
				} else {
					
				}
			}
			else{
				$("body").append('<div class="wuwang"><img src="../../image/iconfont-wangluo.png"><p>网络拥堵，信息塞车</p></div>')
			}
		});
		 
	})
	function rec(){
		window.history.go(-1);
	}
	sTart_Stop();
    /*点击收藏函数-ty-开始*/
    function collectInfo(){
		if($mtype=="guest")
		{
			alert("立刻变身会员吧");
		}else{
	
			var bodyParam = "mid="+$mid+"&groupid="+$groupid+"&did="+initdata.get("gcotactsinfo")+"&tomid="+myMid;
	
			ajaxcocRequest("../../../api/account/addmemberfriendssms","POST",bodyParam,function(msg){
				if(msg.code ==100){
				if (type == 0) {
							alert("您请求增加好友的消息已经发出！");
							$('#collectImg').attr("src","../../image/home/busess/soucang.png");
							type = 1;	
				} 
				else {
							//alert("已经取消收藏");
							$('#collectImg').attr("src","../../image/home/busess/soucang2.png");
							type = 0;
				}
			}else{
				$("body").append('<div class="wuwang"><img src="../../image/iconfont-wangluo.png"><p>网络拥堵，信息塞车</p></div>')
			}
			});
		}
    }

		function chatme(){
			if($mtype=="guest")
			{
				alert("立刻变身会员吧");
			}else{
				window.location='../chart.html'+'?infoid='+myMid+"&flag="+name;
			}
		}
		
		function openComWin(){
			window.location='seleve_company_body.html'+'?infoid='+myMid;
		}
		function openGroupWin(){
			window.location='selfinfo_groupslist.html'+'?infoid='+myMid;
		}
		function openBusessWin(){
			//发布商机
			window.location='busess_publish_listBody.html'+'?infoid='+myMid;
		}
</script>
</html>